<template>
    <!-- 单图片文章 -->
    <div class="single" @click="$emit('clicked')">
      <div class="left">
        <p class="text">{{postData.title}}</p>

        <div class="follow">
          <span>{{postData.user.nickname}}</span>
          <i class="follow-num">{{comment}}跟帖</i>
        </div>
      </div>
      <img :src="postData.cover[0].url || fixImgUrl" alt class="png" />
    </div>
</template>

<script>
export default {
    props:['postData','comment']
}
</script>

<style lang="less" scoped>

.single {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 100/360*100vw;
  padding: 0 10/360 * 100vw;
  font-size: 14/360*100vw;
  border-bottom: 1/360 * 100vw solid #afafaf;
  .left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    .text{
        margin: 10/360*100vw 0 5/360*100vw;
    }
    .follow {
      padding: 10/360*100vw 0;
      color: #868686;
      .follow-num {
        margin-left: 10/360*100vw;
      }
    }
  }
  .png {
    width: 100/360 * 100vw;
    height: 100%;
    object-fit: contain;
  }
}
</style>